﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Tasks.aspx.cs" Inherits="Main_Personal_Tasks" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
   <%-- <link rel="Stylesheet" href="../css/main.css" />--%>
</head>
<body>
    <form id="form1" runat="server">
    <div style="padding-top:2%" id="divTasks">
        <table border="0" cellpadding="0" cellspacing="0" style="width:100%;padding-left: 2%;">
            <tr>
                <td style="width:50px">
                    <img id="imgLogo" alt="logo" src="images/sidebar_links_bg.gif" />
                </td>
                <td align="left">
                    <h1 style="font-size:20px;">My Tasks</h1>
                </td>
            </tr>
        </table>
        <img id="imgheaderhr" src="images/links_header_hr.jpg" alt="link header hr"  style="background-repeat:repeat-x; width: 100%; height: 8px;"/>
        <table border="0" cellpadding="0" cellspacing="0" style="width:100%;padding-left: 2%; padding-top: 15px;">
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <%--main table program here--%>
                                <asp:DataGrid ID="dgTasks" runat="server" AutoGenerateColumns="false" 
                                    Width="600px" BorderColor="Silver" onitemdatabound="dgTasks_ItemDataBound" GridLines="Vertical">
                                    <HeaderStyle BackColor="Silver" HorizontalAlign="Center" />
                                    <ItemStyle  HorizontalAlign="Center" />
                                    <Columns>
                                        <asp:BoundColumn  DataField="taskNo"  SortExpression="taskNo" HeaderText="#"></asp:BoundColumn>
                                        <asp:BoundColumn DataField ="taskDescription" SortExpression="taskDescription"  HeaderText="Description"></asp:BoundColumn>
                                        <asp:BoundColumn DataField ="taskDueDate" SortExpression="taskDueDate"  HeaderText="Due Date" ItemStyle-Width="80px"></asp:BoundColumn>                                       
                                        <asp:TemplateColumn HeaderText="Details">
                                            <ItemStyle Width="50px"/>
                                            <ItemTemplate>
                                                <asp:Label ID="lblViewDetails" runat="server" Font-Underline="true" ForeColor="Blue" Text="View"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:BoundColumn DataField ="taskStatus" SortExpression="taskStatus"  HeaderText="Status" ItemStyle-Width="100px"></asp:BoundColumn>                                       
                                    </Columns>
                                </asp:DataGrid>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" style="padding-top: 5px">
                                <input type="button" id="btnMarkDone" value="Mark As: " onclick="marktask();" style="width:50px" />
                                <asp:DropDownList ID="ddTaskStatus" runat="server"></asp:DropDownList>
                                <input type="button" id="btnAddTask" value="Add" onclick="showTaskOperation('Add');" style="width:50px" />
                                <input type="button" id="btnEditTask" value="Edit" onclick="showTaskOperation('Edit');" style="width:50px" />
                                <input type="button" id="btnDelete"  value="Delete" onclick="deleteSelectedTask();" style="width:50px" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <div id="divTaskInfo">
                    
                    </div>
                </td>
            </tr>
        </table>
    </div>
    
    <div id="divTaskPopup" style="position:absolute; display:none">
            <table border="0" 
            style="border:2px solid black;font-size:100%; height: 120px; width: 800px; background-color:#ffffff">
            <tr>
                <td id="tdOperation" align="center" colspan="2" 
                    style="color:White;background-color:steelblue;font-weight:bold;">
                    Add Task</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblTaskDescription" runat="server">Description:</asp:Label>
                </td>
                <td style="width:640px">
                    <asp:TextBox ID="txtTaskDescription" runat="server" Width="620px"></asp:TextBox>&nbsp;<span style="color:Red">*</span>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblTaskDueDate" runat="server">Due Date:</asp:Label>
                </td>
                <td style="width:640px">
                    <asp:TextBox ID="txtTaskDueDate" runat="server" Width="100px" ReadOnly="true"></asp:TextBox>&nbsp;<span style="color:Red">*</span>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblTaskDetails" runat="server">Task Details:</asp:Label>
                </td>
                <td style="width:640px">
                    <textarea  id="txtTaskDetails" style="width:620px; height:100px"></textarea>
                    &nbsp;<span style="color:Red">*</span>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label2" runat="server">Attatchments:</asp:Label>
                </td>
                <td>
                    <div id="divFileAttatchments" style="display:inline; line-height:25px;">
                    </div>
                    &nbsp;
                    <%--<div style="display:inline;">
                        <input id="fileFakeAttatchment" type="file" class="fakefile" style="width:5px" onchange="openTaskAttatchmentUpload();" />
                        <img src="images/upload.png" />
                    </div>--%>
                    <input type="button" id="btnTaskAttatchmentUpload" value="Upload" onclick="openTaskAttatchmentUpload();"/>
                    <div id="uploadProgress" style="display:none">
                        <img src="images/uploading.gif"  style="height:15px;width:15px; vertical-align:middle; display:inline"/>
                        <span>Uploading File...</span>
                    </div>
                </td>
            </tr>
             <tr>
                <td align="center" colspan="2" style="color:Red;">
                    <asp:Label ID="lblErrorMessage" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" colspan="2">
                    <input type="button" id="btnTaskOperation"  value="Add Link" onclick="javascript:PerformTaskOperation();"/>
                    <input type="button" id="btnTaskCancel"  value="Cancel" onclick="javascript:CancelTaskOperation();" />
                </td>
            </tr>
        </table>
        </div>
    </form>
</body>
</html>
